package com.ip;

import java.awt.Graphics;
import java.awt.image.BufferedImage;
import javax.swing.JPanel;

/**
 *
 * @author Sajarwo Anggai
 */
public class TilePattern extends JPanel {

    private int imPosition;
    BufferedImage img;
    String name;

    public TilePattern(String name, BufferedImage img , int pos) {
        this.img = img;
        this.name = name;
        this.imPosition = pos;
    }

    public BufferedImage getImage() {
        return img;
    }

    @Override
    public void paint(Graphics g) {
        super.paint(g);
        g.drawImage(getImage(), 0, 0, this);
    }
}

